package sysu.el.audit;

public class MinInt {
	int ans;
	public MinInt(int init){
		this.ans = init;
	}
	
	public void reset(){
		this.ans = Integer.MAX_VALUE;
	}
	
	public MinInt(){
		this(Integer.MAX_VALUE);
	}
	
	public void sample(int sam){
		if (sam < this.ans)
			this.ans = sam;
	}

	public int getAns(int sam){
		if (sam < this.ans)
			this.ans = sam;
		return this.getAns();
	}
	
	public int getAns(){
		return this.ans;
	}
	
	public static MinInt Ins = new MinInt();
}
